package com.zengfa.task.client.service;

import com.zengfa.task.api.model.JobDTO;

public interface JobClientService {

	/**
	 * 创建任务
	 * @param jobGroup
	 * @param bizId
	 * @return
	 */
	public JobDTO createFlowTask(String jobGroup,String bizId);
	
	/**
	 * 执行任务
	 * @param jobDTO
	 */
	public void runFlowTask(JobDTO jobDTO);
	
	/**
	 * 执行任务
	 * @param jobGroup
	 * @param bizId
	public void runTask(String jobGroup,String bizId);
	 */
	
	/**
	 * 执行异步单任务
	 */
	public JobDTO runAsyncSingleTask(String jobGroup,String bizId,Runnable runnable);
	
	/**
	 * 执行同步单任务
	 */
	public JobDTO runSingleTask(String jobGroup,String bizId,Runnable runnable);
	
	/**
	 * 停止任务
	 */
	public void stopTask(String jobGroup, String bizId);
	
	/**
	 * 获得任务
	 * @param jobGroup
	 * @param bizId
	 * @return
	 */
	public JobDTO getTask(String jobGroup,String bizId);
	
}
